package pl.koziolekweb.testsonline.examples.console;

import pl.koziolekweb.testsonline.examples.console.view.ViewGenerator;
import pl.koziolekweb.testsonline.model.Answer;
import pl.koziolekweb.testsonline.model.Question;
import pl.koziolekweb.testsonline.model.Test;
import pl.koziolekweb.testsonline.model.exam.Exam;
import pl.koziolekweb.testsonline.model.exam.Result;

/**
 * Hello world!
 * 
 */
public class App {
	public static void main(String[] args) {
		Test test = new Test();
		Question question = new Question("Dokończ zdanie: Ala ma kota a kot...");
		Answer answer11 = new Answer("to mruczek", false);
		Answer answer12 = new Answer("ma AIDS", true);
		question.addAnswer(answer11);
		question.addAnswer(answer12);
		test.addQuestion(question);
		Exam exam = new ConsoleExam("Example", test);
		exam.start();
		Result result = exam.stop();
		(new ViewGenerator()).generate(result.getExamResult()+"");
	}
}
